package com.zjj.learn.designmodel.pattern.adapter.class_adapter;

/**
 * *** @author zjj_admin
 * *** 2022/4/10 14:13
 */
public class Computer {

    public String readSD(SDCard sdCard){
        if(sdCard == null){
            throw  new NullPointerException("SDCard must is not null");
        }
        return sdCard.readFromSD();
    }


    public void writeSD(SDCard sdCard){
        if(sdCard == null){
            throw  new NullPointerException("SDCard must is not null");
        }
        sdCard.writeToSD(sdCard.readFromSD());
    }
}
